# -*- coding: utf-8 -*-
# @Time    : 2019/11/18 14:00
# @Author  : xiao

from basic.device.Android import Android

class login(Android):

    inputPhoneNum="com.cloudbae.lovenanning:id/etInputPhoneNum"
    inputPwd = "com.cloudbae.lovenanning:id/etInputPwd"
    loginBtn="com.cloudbae.lovenanning:id/tvLogin"
    pwdLogin='账号密码登录'
    checkBox = 'com.cloudbae.lovenanning:id/checkBox'    #勾选协议


    def loginbyName(self,name, pwd):
        # login.poco()
        login.poco(login.inputPhoneNum).set_text(name)
        login.poco(login.inputPwd).set_text(pwd)
        login.poco(login.loginBtn).click()

    @classmethod
    def clickPwdLogin(self):
        bb=self.poco(text='账号密码登录')
        bb.click()
        self.poco(login.checkBox).click()
